import 'package:json_annotation/json_annotation.dart';

part 'learning_record.g.dart';

@JsonSerializable()
class LearningRecord {
  final String id;
  final String wordId;
  final DateTime studiedAt;
  final bool isCorrect;
  final String difficulty;
  final int attemptCount;

  const LearningRecord({
    required this.id,
    required this.wordId,
    required this.studiedAt,
    required this.isCorrect,
    required this.difficulty,
    this.attemptCount = 1,
  });

  factory LearningRecord.fromJson(Map<String, dynamic> json) => _$LearningRecordFromJson(json);

  Map<String, dynamic> toJson() => _$LearningRecordToJson(this);
} 